/*
 * Class3Bbis.h
 *
 *  Created on: 2015年7月16日
 *      Author: Administrator
 */

#ifndef BCCH_CLASS3BBIS_H_
#define BCCH_CLASS3BBIS_H_

#include "Class3.h"

//<Header::bitstring(5)>
//<Class Type 3: 0>
//<Segment type: 0001>
//struct ST3Bbis_Header{
//	//header 由classType、segment Type组成
//	//1 bit
//	unsigned char classType:1;
//	//4bits
//	unsigned char segmentType:4;
//};
struct ST3Bbis_ConcurrentBCCHInfo{
	//	<header: bit string(3)> - three bits b3 b2 b1 to indicate
	//		- b1 0 : Satellite id of BCCH same as previous element
	//		- b1 1 : Satellite id of BCCH differs from previous element
	//		- b2 0 : MCC same as the previous element in the list
	//		- b2 1 : MCC differs from the previous element
	//		- b3 0 : MNC same as the previous element in the list
	//		- b3 1 : MNC differs from the previous element
	unsigned char header:3;
	//<ARFCN: bit string(11)> - ARFCN value corresponding to the BCCH carrier
	unsigned short ARFCN:11;
	//	<Satellite Id: bit string(2)> - This is omitted if the Satellite Id of the BCCH carrier
	//	- unchanged from the previous element.
	unsigned char satelliteId:2;// - presence is indicated in the header
	//	<MCC: bit string(10)> - valid range 0 - 999. This is omitted if MCC is unchanged
	//				- from previous element in the list.
	unsigned short MCC:10;//- presence is indicated in the header
	//	<MNC: bit string(7)> - valid range 0 - 99. This is omitted if MNC is unchanged
	//				- from previous element in the list.
	unsigned char MNC:7;// - presence is indicated in the header

};

class Class3Bbis :public Class3{
public:
	Class3Bbis();
	virtual ~Class3Bbis();

	//	ST3Bbis_Header header;
	//<Number of Concurrent BCCH: bitstring(4)>– Range from 0 - 15, the maximum value depends upon
	//	the number of BCCHs that can actually be accommodated
	unsigned char concurrentBCCHNum:4;
	//<Concurrent BCCH Information_part1:bitstring(91)> – First partition of the concurrent BCCH information list。
	//Compressed encoding (see clause 4.2.2.1.4)
	//unsigned char concurrentBCCHInfo[12];
	ST3Bbis_ConcurrentBCCHInfo conBCCHInfoPart1[3];
	//<Spare: bitstring (23)>– 23 bits
	unsigned int spare:23;

};

#endif /* BCCH_CLASS3BBIS_H_ */
